<?php
/**
 * User: 五哥派
 * Date: 2024/6/26
 * Tel(同WX): 17335592719
 */

namespace app\admin\controller\system;

use app\admin\controller\Base;
use app\admin\model\system\Menu as MenuModel;

class Menu extends Base{

    protected $model;

    public function __construct(MenuModel $model){
        parent::__construct();
        $this->model = $model;
    }

    // 获取初始化数据
    public function getInit(){
        $homeInfo = [
            'title' => '主页',
            'href'  => '/admin/index/welcome',
        ];
        $logoInfo = [
            'title' => '商城后台',
            'image' => '/static/admin/layuimini/images/logo.png',
            "href" => "/"
        ];
        $menuInfo = $this->getMenuList();
        $systemInit = [
            'homeInfo' => $homeInfo,
            'logoInfo' => $logoInfo,
            'menuInfo' => $menuInfo,
        ];
        return json($systemInit);
    }

    public function getMenuList(){
        $menus = [
            [
                "title" => "常规管理",
                "icon" => "fa fa-address-book",
                "href" => "/",
                "target" => "_self",
                "child" => [
                    [
                        "title" => "主页管理",
                        "href" => "/admin/index/welcome",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                    ],

                    /*[
                        "title" => "用户管理",
                        "href" => "",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "用户列表",
                                "href" =>  "/admin/user/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ]
                        ]
                    ],*/
                    [
                        "title" => "订单管理",
                        "href" => "",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "全部订单",
                                "href" =>  "/admin/store.order/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ]/*,
                            [
                                "title" =>  "售后订单",
                                "href" =>  "/admin/order/lstreturn",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ],
                            [
                                "title" =>  "收银订单",
                                "href" =>  "/admin/order/lstshouyin",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ],

                            [
                                "title" =>  "核销记录",
                                "href" =>  "/admin/order/lsthexiao",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ],
                            [
                                "title" =>  "订单配置",
                                "href" =>  "/admin/order/configeidt",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ]*/
                        ]
                    ],
                    [
                        "title" => "商品管理",
                        "href" => "",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "商品分类",
                                "href" =>  "/admin/store.category/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ],
                            [
                                "title" =>  "规格列表",
                                "href" =>  "/admin/store.specs/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ],
                            [
                                "title" =>  "商品列表",
                                "href" =>  "/admin/store.goods/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ],
                            /*[
                                "title" =>  "商品评论",
                                "href" =>  "/admin/store.reply/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ],*/
                        ]
                    ],
                    [
                        "title" => "用户管理",
                        "href" => "",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "用户列表",
                                "href" =>  "/admin/user.user/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ]
                        ]
                    ],
                    [
                        "title" => "分销管理",
                        "href" => "",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "入驻申请",
                                "href" =>  "/admin/dealer.apply/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ],
                            [
                                "title" =>  "分销商",
                                "href" =>  "/admin/dealer.user/lst",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ]
                        ]
                    ],
                    /*
                    [
                        "title" => "营销管理",
                        "href" => "",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "营销",
                                "href" =>  "",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ]
                        ]
                    ],

                    [
                        "title" => "财务管理",
                        "href" => "",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "财务",
                                "href" =>  "",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ]
                        ]
                    ],
                    */
                    [
                        "title" => "页面管理",
                        "href" => "",
                        "icon" => "fa fa-window-maximize",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "首页轮播",
                                "href" =>  "/admin/page.banner/lst",
                                "icon" =>  "fa fa-gears",
                                "target" => "_self"
                            ],
                            [
                                "title" =>  "首页公告",
                                "href" =>  "/admin/page.notice/lst",
                                "icon" =>  "fa fa-gears",
                                "target" => "_self"
                            ],
                            [
                                "title" =>  "首页导航区",
                                "href" =>  "/admin/page.nav/lst",
                                "icon" =>  "fa fa-gears",
                                "target" => "_self"
                            ]
                        ]
                    ],

                    [
                        "title" => "系统管理",
                        "href" => "",
                        "icon" => "fa fa-home",
                        "target" => "_self",
                        "child" => [
                            [
                                "title" =>  "协议配置",
                                "href" =>  "/admin/system.agreement/edit",
                                "icon" =>  "fa fa-tachometer",
                                "target" => "_self"
                            ]
                        ]
                    ],
                ]
            ]
        ];

        return $menus;
    }

    public function index(){}



}

